package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Accident;
import cn.wolfcode.crm.query.AccidentQueryObject;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AccidentMapper {
    int deleteByPrimaryKey(Long id);

    int insertForAccident(Accident record);

    Accident selectByPrimaryKey(Long id);

    List<Accident> selectAll();

    int updateByPrimaryKeyForAccident(Accident record);

    int queryForCount(AccidentQueryObject qo);

    List<Accident> queryForList(AccidentQueryObject qo);

    List<Accident> accidentAndClaimBill();
    //更改状态
    void updateState(@Param("id") Long id, @Param("state")int state,@Param("validateStaff")String validateStaff);
    /*
    * 查询状态为待审核的数据,即state=4
    * */
    int queryByAuditForCount(QueryObject qo);

    List<Accident> queryByAuditForList(QueryObject qo);
    /*
    * 查询状态为待审核的数据,即state=2,state=3
    * */
    int queryByUnBillForCount(QueryObject qo);

    List<Accident> queryByUnBillForList(QueryObject qo);
    /*
    * 查询状态为待审核的数据,即state=5
    * */
    int queryByUnPayForCount(QueryObject qo);

    List<Accident> queryByUnPayForList(QueryObject qo);

    void updateStateNoUser(@Param("id")Long id, @Param("state")int state);

    /*
    * 查询所有状态的数据
    * */
    int queryForAllCount(AccidentQueryObject qo);

    List<Accident> queryForAllList(AccidentQueryObject qo);
}